package org.spring.boot.schedule.ws;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author: eastcom
 * @desc:
 **/
@Component
public class ScheduleWs {

	private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

	@Scheduled(cron = "0 0/1 * * * ?")
	public void scheduleTest(){
		System.out.println("当前时间为："+dateFormat.format(new Date()));
	}
}
